/*================================================================
*   Copyright (C) 2023 Sangfor Ltd. All rights reserved.
*   
*   文件名称：darray_algos.c
*   创 建 者：szmoto, szmoto@vip.qq.com
*   创建日期：2023年08月22日
*   描    述：
*
================================================================*/

#include <lcthw/darray_algos.h>
#include <stdlib.h>
int DArray_qsort(DArray *array, DArray_compare cmp)
{
    qsort(array->contents, DArray_count(array), sizeof(void *), cmp);
    return 0;
}
int DArray_heapsort(DArray *array, DArray_compare cmp)
{
    return heapsort(array->contents, DArray_count(array), sizeof(void *), cmp);
}
int DArray_mergesort(DArray *array, DArray_compare cmp)
{
    return mergesort(array->contents, DArray_count(array), sizeof(void *), cmp);
}